export default class RunEntity{
    constructor(commands){
        this.commands=commands
        this.coordinate=0;
        this.variables={}
    }
     run( ){
        let i=this.coordinate;
        let _this=this;
        return new Promise(resolve => {
            debugger
            if(this.commands[i][3]){
               let obj= qguan(this.commands[i][3]);
               if(obj.isSynchro){
                   let res=  qguan(this.commands[i][0],this.commands[i][1],this.commands[i][2],this.commands[i][3])
                   _this.coordinate++;
                   res.then(res=>{
                       resolve(200)
                   })
               }else {
                   qguan(this.commands[i][0],this.commands[i][1],this.commands[i][2],this.commands[i][3])
                   _this.coordinate++;

                   resolve(200)

               } ;

            }else {
                qguan(this.commands[i][0],this.commands[i][1],this.commands[i][2],this.commands[i][3])
                _this.coordinate++;
                resolve(200)
            }

        })


    }
}